{include file="header.html"}
<div id="page_main" class="main-right">
  <div id="rightTop">
    <p>{$lang.gcategory}</p>
    <ul class="subnav">
      <li><span>{$lang.manage}</span></li>
      <li><a class="btn1" href="{url route='gcategory/add'}">{$lang.add}</a></li>
      <!--<li><a class="btn1" href="{url route='gcategory/export'}">{$lang.export}</a></li>
      <li><a class="btn1" href="{url route='gcategory/import'}">{$lang.import}</a></li>-->
    </ul>
  </div>
  <div class="flexigrid">
    <table class="distinction">
      <!--{if $gcategories}-->
      <thead>
        <tr class="tatr1">
          <th class="w30"><input id="checkall_1" type="checkbox" class="checkall" /></th>
          <th width="50%"><span class="all_checkbox">
            <label for="checkall_1">{$lang.checkall}</label>
            </span>{$lang.cate_name} </th>
          <th>{$lang.group}</th>
          <th>{$lang.sort_order}</th>
          <th>{$lang.if_show}</th>
          <th class="handler">{$lang.handler}</th>
        </tr>
      </thead>
      <!--{/if}--> 
      <!-- {if $gcategories} -->
      <tbody id="treet1">
        <!-- {/if} --> 
        <!--{foreach from=$gcategories item=gcategory}-->
        <tr>
          <td class="align_center w30"><input type="checkbox" class="checkitem" value="{$gcategory.cate_id}" /></td>
          <td class="node" width="50%"><!--{if $gcategory.switchs}--><i class="tv-expandable" ectype="flex" controller="gcategory" status="open" fieldid="{$gcategory.cate_id}"></i><!--{else}--><i class="tv-item"></i><!--{/if}--><span class="node_name editable" ectype="inline_edit" fieldname="cate_name" fieldid="{$gcategory.cate_id}" required="1" title="{$lang.editable}" controller="gcategory" >{$gcategory.cate_name|escape}</span></td>
          <td class="align_center"><span class="editable" ectype="inline_edit" fieldname="groupid" fieldid="{$gcategory.cate_id}" datatype="number" title="{$lang.editable}" controller="gcategory" >{$gcategory.groupid|default}</span></td>
          <td class="align_center"><span class="editable" ectype="inline_edit" fieldname="sort_order" fieldid="{$gcategory.cate_id}" datatype="number" title="{$lang.editable}" controller="gcategory" >{$gcategory.sort_order}</span></td>
          <td class="align_center"><!--{if $gcategory.if_show}--><i class="positive_enabled" ectype="inline_edit" fieldname="if_show" fieldid="{$gcategory.cate_id}" fieldvalue="1" title="{$lang.editable}" controller="gcategory" ></i><!--{else}--><i class="positive_disabled" ectype="inline_edit" fieldname="if_show" fieldid="{$gcategory.cate_id}" fieldvalue="0" title="{$lang.editable}" controller="gcategory" ></i><!--{/if}--></td>
          <td class="handler bDiv" style="line-height: 22px; background:none; width:380px; text-align:left;"><a href="{url route='gcategory/edit' id=$gcategory.cate_id}" class="btn blue"><i class="fa fa-pencil-square-o"></i>{$lang.edit}</a> <a uri="{url route='gcategory/delete' id=$gcategory.cate_id}" confirm="{$lang.drop_confirm}" class="btn red J_AjaxRequest"><i class="fa fa-trash-o"></i>{$lang.drop}</a> <a href="{url route='gcategory/add' pid=$gcategory.cate_id}" class="btn green"><i class="fa fa-plus"></i>{$lang.add_child}</a> <a href="{url route='goodsprop/distribute' cate_id=$gcategory.cate_id}" class="btn blue"><i class="fa fa-list-ul"></i>{$lang.distribution_prop}</a> 
            <!--{if $gcategory.parent_id eq 0}--> 
            <a href="{url route='gcategory/ad' id=$gcategory.cate_id}" class="btn green"><i class="fa fa-file-image-o"></i>{$lang.gcategory_ad}</a> 
            <!--{/if}--></td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
          <td colspan="6">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}--> 
        <!-- {if $gcategories} -->
      </tbody>
      <!-- {/if} -->
      <tfoot>
        <tr class="tr_pt10"> 
          <!-- {if $gcategories} -->
          <td class="align_center"><input id="checkall_2" type="checkbox" class="checkall"></td>
          <td colspan="5" id="batchAction"><span class="all_checkbox mt5">
            <label for="checkall_2">{$lang.checkall}</label>
            </span>
            <div class="fbutton J_BatchDel" style="border:0;" confirm="{$lang.drop_confirm}" uri="{url route='gcategory/delete'}" name="id">
              <div class="del" title="{$lang.batch_del_for_selected}"><span><i class="fa fa-trash"></i>{$lang.batch_del}</span></div>
            </div></td>
          <!--{/if}--> 
        </tr>
      </tfoot>
    </table>
  </div>
</div>
{include file="footer.html"}